<div class="SipeiInfo border_3 pt20 pb20 centered back_bgf">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
    'action' => Yii::app()->createUrl($this->route),
    'method' => 'POST',
    'id' => 'searchForm',
    'htmlOptions'=>array('target'=>'ajax-frame')
    ));
    ?>
    <table class="fontc_666 height32">
        <tbody>
            <tr height="55">
                <td valign="top" width="125" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>排序号：</td>
                <td valign="top" width="370" class="formValidator_td">
                    <input type="text"  name="info[number]" id='number' value="<?php echo $data['number']; ?>" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                    <div class="formValidator_tip">
                        <p id="numberTip" ></p>
                    </div>
                </td>
            </tr>
            <tr height="55">
                <td valign="top" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>字段名称：</td>
                <td valign="top" class="formValidator_td">
                    <input type="text"  name="info[name]" id='name' value="<?php echo $data['name']; ?>" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                    <div class="formValidator_tip">
                        <p id="nameTip" ></p>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="right" class="pb20 pr5"><span class="pr5 fontc_orange_red">*</span>数据类型：</td>
                <td class="pb20">
                    <span class="fl standard_select pt5 pr7 pb5 pl3 border_c border_3">
                        <span class="fl select_shelter">
                            <select name="info[type]" class="fl fontc_666" id='type'>
                                <?php
                                $tabletype = Import::_gettabletype();
                                foreach ($tabletype as $k => $v):
                                    ?>
                                    <option value="<?php echo $k; ?>" <?php if ($k == $data['type']): ?>selected<?php endif; ?>><?php echo $v; ?></option>
                                <?php endforeach; ?>
                            </select>
                        </span>
                    </span>
                </td>
            </tr>
            <tr height="55">
                <td valign="top" align="right" class="pr5"><span class="pr5 fontc_orange_red">*</span>字段长度：</td>
                <td valign="top" class="formValidator_td">
                    <input type="text"  name="info[length]" id='length' value="<?php echo $data['length']; ?>" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" />
                    <div class="formValidator_tip">
                        <p id="lengthTip" ></p>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="right" class="pr5">小数位：</td>
                <td><input type="text"  name="info[float]" value="<?php echo $data['float']; ?>" class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" /></td>
            </tr>
            <tr>
                <td align="right" class="pt20 pr5">对应栏位：</td>
                <td class="pt20">
                    <span class="fl standard_select pt5 pr7 pb5 pl3 border_c border_3">
                        <span class="fl select_shelter">
                            <select name="info[row]" class="fl fontc_666" onchange="checkrow(this.value)">
                                <option value="exam_id" <?php if ($v['COLUMN_NAME'] =='exam_id') echo 'selected' ?>>考试项目</option>
								<option value="student_id" <?php if ($v['COLUMN_NAME'] =='student_id') echo 'selected' ?>>学生ID</option>
								<option value="student_name" <?php if ($v['COLUMN_NAME'] =='student_name') echo 'selected' ?>>姓名</option>
								<option value="exam_code" <?php if ($v['COLUMN_NAME'] =='exam_code') echo 'selected' ?>>准考号</option>
								<option value="roll" <?php if ($v['COLUMN_NAME'] =='roll') echo 'selected' ?>>学籍号</option>
								<option value="city_code" <?php if ($v['COLUMN_NAME'] =='city_code') echo 'selected' ?>>城市代码</option>
								<option value="city_name" <?php if ($v['COLUMN_NAME'] =='city_name') echo 'selected' ?>>城市简称</option>
								<option value="school_code" <?php if ($v['COLUMN_NAME'] =='school_code') echo 'selected' ?>>学校代码</option>
								<option value="school_name" <?php if ($v['COLUMN_NAME'] =='school_name') echo 'selected' ?>>学校名称</option>
								<option value="class_name" <?php if ($v['COLUMN_NAME'] =='class_name') echo 'selected' ?>>班级代码</option>
								<option value="student_sex" <?php if ($v['COLUMN_NAME'] =='student_sex') echo 'selected' ?>>学生性别</option>
								<option value="school_id" <?php if ($v['COLUMN_NAME'] =='school_id') echo 'selected' ?>>学校id</option>
								<option value="nature" <?php if ($v['COLUMN_NAME'] =='nature') echo 'selected' ?>>学校性质</option>
								<option value="interstellar" <?php if ($v['COLUMN_NAME'] =='interstellar') echo 'selected' ?>>学校星级</option>
								<option value="socre" <?php if ($v['COLUMN_NAME'] =='socre') echo 'selected' ?>>中考成绩</option>
								<option value="disciplin_code" <?php if ($v['COLUMN_NAME'] =='disciplin_code') echo 'selected' ?>>科别代码</option>
								<option value="disciplin_name" <?php if ($v['COLUMN_NAME'] =='disciplin_name') echo 'selected' ?>>科别名称</option>
								<option value="disciplin_type" <?php if ($v['COLUMN_NAME'] =='disciplin_type') echo 'selected' ?>>科别类型</option>
								<option value="ywkgf" <?php if ($v['COLUMN_NAME'] =='ywkgf') echo 'selected' ?>>语文客观分</option>
								<option value="ywzgf" <?php if ($v['COLUMN_NAME'] =='ywzgf') echo 'selected' ?>>语文主观分</option>
								<option value="ywzwf" <?php if ($v['COLUMN_NAME'] =='ywzwf') echo 'selected' ?>>语文作文分</option>
								<option value="ywfjf" <?php if ($v['COLUMN_NAME'] =='ywfjf') echo 'selected' ?>>语文附加分</option>
								<option value="ywf" <?php if ($v['COLUMN_NAME'] =='ywf') echo 'selected' ?>>语文总分</option>
								<option value="sxtkf" <?php if ($v['COLUMN_NAME'] =='sxtkf') echo 'selected' ?>>数学填空</option>
								<option value="sxjdf" <?php if ($v['COLUMN_NAME'] =='sxjdf') echo 'selected' ?>>数学解答</option>
								<option value="sxfjf" <?php if ($v['COLUMN_NAME'] =='sxfjf') echo 'selected' ?>>数学附加</option>
								<option value="sxf" <?php if ($v['COLUMN_NAME'] =='sxf') echo 'selected' ?>>数学总分</option>
								<option value="yykgf" <?php if ($v['COLUMN_NAME'] =='yykgf') echo 'selected' ?>>英语客观分</option>
								<option value="yyzgf" <?php if ($v['COLUMN_NAME'] =='yyzgf') echo 'selected' ?>>英语主观分</option>
								<option value="yyzwf" <?php if ($v['COLUMN_NAME'] =='yyzwf') echo 'selected' ?>>英语作文分</option>
								<option value="yyf" <?php if ($v['COLUMN_NAME'] =='yyf') echo 'selected' ?>>英语总分</option>
								<option value="yswzf" <?php if ($v['COLUMN_NAME'] =='yswzf') echo 'selected' ?>>语数外总分</option>
								<option value="yswzfhfjf" <?php if ($v['COLUMN_NAME'] =='yswzfhfjf') echo 'selected' ?>>语数外总分（含附加分）</option>
								<option value="wlkgf" <?php if ($v['COLUMN_NAME'] =='wlkgf') echo 'selected' ?>>物理客观分</option>
								<option value="wlzgf" <?php if ($v['COLUMN_NAME'] =='wlzgf') echo 'selected' ?>>物理主观分</option>
								<option value="wlf" <?php if ($v['COLUMN_NAME'] =='wlf') echo 'selected' ?>>物理总分</option>
								<option value="hxkgf" <?php if ($v['COLUMN_NAME'] =='hxkgf') echo 'selected' ?>>化学客观分</option>
								<option value="hxzgf" <?php if ($v['COLUMN_NAME'] =='hxzgf') echo 'selected' ?>>化学主观分</option>
								<option value="hxf" <?php if ($v['COLUMN_NAME'] =='hxf') echo 'selected' ?>>化学总分</option>
								<option value="swkgf" <?php if ($v['COLUMN_NAME'] =='swkgf') echo 'selected' ?>>生物客观分</option>
								<option value="swzgf" <?php if ($v['COLUMN_NAME'] =='swzgf') echo 'selected' ?>>生物主观分</option>
								<option value="swf" <?php if ($v['COLUMN_NAME'] =='swf') echo 'selected' ?>>生物总分</option>
								<option value="zzkgf" <?php if ($v['COLUMN_NAME'] =='zzkgf') echo 'selected' ?>>政治客观分</option>
								<option value="zzzgf" <?php if ($v['COLUMN_NAME'] =='zzzgf') echo 'selected' ?>>政治主观分</option>
								<option value="zzf" <?php if ($v['COLUMN_NAME'] =='zzf') echo 'selected' ?>>政治总分</option>
								<option value="dlkgf" <?php if ($v['COLUMN_NAME'] =='dlkgf') echo 'selected' ?>>地理客观分</option>
								<option value="dlzgf" <?php if ($v['COLUMN_NAME'] =='dlzgf') echo 'selected' ?>>地理主观分</option>
								<option value="dlf" <?php if ($v['COLUMN_NAME'] =='dlf') echo 'selected' ?>>地理总分</option>
								<option value="lskgf" <?php if ($v['COLUMN_NAME'] =='lskgf') echo 'selected' ?>>历史客观分</option>
								<option value="lszgf" <?php if ($v['COLUMN_NAME'] =='lszgf') echo 'selected' ?>>历史主观分</option>
								<option value="lsf" <?php if ($v['COLUMN_NAME'] =='lsf') echo 'selected' ?>>历史总分 </option>
								<option value="ramark" <?php if ($v['COLUMN_NAME'] =='ramark') echo 'selected' ?>>备注</option>
								<option value="track" <?php if ($v['COLUMN_NAME'] =='track') echo 'selected' ?>>跟踪号</option>
								<option value="default_statis" <?php if ($v['COLUMN_NAME'] =='default_statis') echo 'selected' ?>>是否统计分数</option>
								<option value="statis" <?php if ($v['COLUMN_NAME'] =='statis') echo 'selected' ?>>是否统计</option>
								<option value="addtime" <?php if ($v['COLUMN_NAME'] =='addtime') echo 'selected' ?>>添加时间</option>
								<option value="uptime" <?php if ($v['COLUMN_NAME'] =='uptime') echo 'selected' ?>>更新时间</option>
								<option value="gdz" <?php if ($v['COLUMN_NAME'] =='gdz') echo 'selected' ?>>固定值</option>
						
								<!--<?php
                                $tableinfo = Import::_gettableinfo('student');
                                foreach ($tableinfo as $k => $v):
                                    ?>
                                    <option value="<?php echo $v['COLUMN_NAME']; ?>" <?php if ($v['COLUMN_NAME'] == $data['row']): ?>selected<?php endif; ?>><?php echo $v['COMMENTS']; ?></option>
                                <?php endforeach; ?>
                                <option value="gdz">固定值</option>-->
                            </select>
                        </span>
                    </span>
                </td>
            </tr>
            <tr id="gdz" <?php if ($data['value'] ==''):?>style="display:none;"<?php endif;?>>
                <td align="right" class="pt20 pr5">固定值：</td>
                <td class="pt20"><input type="text" name="info[value]" value="<?php echo $data['value']; ?>"  class="col3 pt5 pr10 pb5 pl10 height20 border_c border_3 fontc_666" /></td>
            </tr>
            <tr>
                <td align="right" class="pt10 pr5">是否生效：</td>
                <td class="pt10"><input type="checkbox" name="info[status]" value='1' <?php if (!empty($data['status'])): ?>checked<?php endif; ?>  /></td>
            </tr>
            <tr>
                <td align="right" class="pt10 pr5 pb20"></td>
                <input type="hidden" name="info[id]" value="<?php echo $data['id']; ?>">
                <td class="pt10 pb20"><input type="submit" value="保存" name="submit" class="b_a_n border_3 back_bgfb w80 height32 fontc_FFF fonts_12 cursor mr10" />
                    <input type="button" value="取消"  onclick="api.close()" class="b_a_n border_3 back_bgb w80 height32 fontc_FFF fonts_12 cursor" />
                </td>
            </tr>
        </tbody>
    </table>
    <?php
    $this->endWidget();
    ?>
</div>
<iframe src='' style="display:none" name='ajax-frame'></iframe>
<script>
$(function() {
	$.formValidator.initConfig({formID: "searchForm", theme: "126", submitOnce: false,
	onError: function(msg, obj, errorlist) {
		$("#errorlist").empty();
		$.map(errorlist, function(msg) {
			$("#errorlist").append("<li>" + msg + "</li>")
		});
		alert(msg);
	},
	ajaxPrompt: '有数据正在异步验证，请稍等...'
	});
	/*排序号验证*/
	$("#number").formValidator({
		onShowText: "请输入排序号",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max:3,
		onError: "请输入排序号长度最少一位"
	}).regexValidator({
		regExp: "intege1",
		dataType: "enum",
		onError: "排序号位数必须是正整数"
	});
	/*字段名称验证*/
	$("#name").formValidator({
		onShowText: "请输入字段名称",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max:20,
		onError: "字段名称长度 在1-20之间(1-10个汉字)"
	});
	/*字段长度验证*/
	$("#length").formValidator({
		onShowText: "请输入字段长度",
		onShow: "",
		onFocus: "",
		onCorrect: "输入正确",
		leftTrim:true,
		rightTrim:true
	}).inputValidator({
		min: 1,
		max:10,
		onError: "字段长度在1-10之间"
	});

})
function checkrow(val){
	if(val=='gdz'){
		$("#gdz").show();
	}else{
		$("#gdz").hide();
	}
}
</script>
<?php exit; ?>